#ifndef _UIRESPONDER_H_
#define _UIRESPONDER_H_

#include <UIKit/UITouch.h>

class QGraphicsSceneMouseEvent;

class UIResponderPrivate;
class UIResponder {
    friend class UIResponderPrivate;

    public:
        UIResponder(UIWindow *window, QGraphicsItem *view = 0);
        virtual ~UIResponder();

        bool scrollEnabled (void) const;
        void setScrollEnabled (bool enabled);

        bool handleTouches (void) const;
        void setTouchesEnabled (bool enabled);

    protected:
        virtual void touchesBegan (UITouch *touch);
        virtual void touchesMoved (UITouch *touch);
        virtual void touchesEnded (UITouch *touch);
        virtual void touchesCancelled (UITouch *touch);

        virtual void swipeEvent (UITouch *touch);
        virtual void multiTapEvent (UITouch *touch);
        virtual void doubleTapEvent (UITouch *touch);
        virtual void singleTapEvent (UITouch *touch);
        virtual void touchHeldEvent (UITouch *touch);
        
        virtual QPointF scrollOffset (void) const;
        virtual void setScrollOffset (const QPointF& pos);

        virtual void touchReleaseEvent (QGraphicsSceneMouseEvent *event);
        virtual void touchPressEvent (QGraphicsSceneMouseEvent *event);
        virtual void touchMoveEvent (QGraphicsSceneMouseEvent *event);        

    private:
        UIResponderPrivate *d;
};

#endif /* !_UIRESPONDER_H_ */

